package cn.broadin.app.hotel.stb.impl.common;

import cn.broadin.app.hotel.startWebapp.StartWebView;
import cn.broadin.app.hotel.stb.IPDVideoPlayer;
import android.content.Context;
import android.util.Log;
import android.webkit.JavascriptInterface;





/**
 * PDVideoPlayerCommon webview打开video通用类
 * @author caolm
 *
 */
public class PDVideoPlayerCommon implements IPDVideoPlayer {
	//日志tag
	private static final String TAG = "PDVideoPlayerCommon";
	public PDVideoPlayerCommon(Context ctx) {
	}
	
	@JavascriptInterface
	public void open(String videoUrl) {
		Log.d("caolm:","VideoPlaer open");
		StartWebView.playVideo(videoUrl);
	}
	
	@JavascriptInterface
	public void close() {
		Log.d("caolm:","VideoPlaer stop");
		StartWebView.releaseMediaPlayer();
	}
}
